/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;

/**
 *
 * @author Marco Antonio
 */
@Entity
public class Rodada implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date inicio;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date termino;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date inicioPalpites;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date terminoPalpites;
    private int numero;
    @OneToOne
    private Campeonato campeonato;

    public Date getInicioPalpites() {
        return inicioPalpites;
    }

    public void setInicioPalpites(Date inicioPalpites) {
        this.inicioPalpites = inicioPalpites;
    }

    public Date getTerminoPalpites() {
        return terminoPalpites;
    }

    public void setTerminoPalpites(Date terminoPalpites) {
        this.terminoPalpites = terminoPalpites;
    }

    public int getNumero() {
        return numero;
    }

    public void setNumero(int numero) {
        this.numero = numero;
    }

    public Campeonato getCampeonato() {
        return campeonato;
    }

    public void setCampeonato(Campeonato campeonato) {
        this.campeonato = campeonato;
    }

    public Date getInicio() {
        return inicio;
    }

    public void setInicio(Date inicio) {
        this.inicio = inicio;
    }

    public Date getTermino() {
        return termino;
    }

    public void setTermino(Date termino) {
        this.termino = termino;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Rodada)) {
            return false;
        }
        Rodada other = (Rodada) object;
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.Rodada[id=" + id + "]";
    }

}
